﻿<%@ WebHandler Language="C#" Class="Login" %>

using System;
using System.Web;

public class Login : IHttpHandler {
    Dao.DealWith dw = new Dao.DealWith(); 
    public void ProcessRequest (HttpContext context) {
        context.Response.ContentType = "text/plain";
        string name = context.Request["name"].ToString();
        string pass = context.Request["pass"].ToString();
        if (dw.UserLogin(name.Trim(), pass.Trim()))
        {
            context.Response.Write("FinancialDefault.htm");
        }
        else
        {
            context.Response.Write("用户名或密码错误！");
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}